<?php

class View implements Action {

    public function setParams($param = null) {
        
    }

    public function validate($response) {
        
    }

    public function execute($response) {
        $con = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die(mysql_error());
        mysql_select_db(DB_NAME, $con) or die(mysql_error());
        $sql = "SELECT * FROM clients";
        $result = mysql_query($sql, $con) or die(mysql_error());

        $clients = fetch_multi_assoc($result);
        $response->set('clients', $clients);
    }

    public function getContentType() {
        return HTML;
    }

    public function getHTTPMethod() {
        return GET;
    }

}

?>
